package cn.qicaiwang.open.app.mapper;


import cn.qicaiwang.open.app.entity.Enterprise;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface EnterpriseMapper {

        List<Map<String, Object>> fuzzySearchByName(@Param("tableName") String tableName,@Param("enterpriseName") String enterpriseName);

        Page<Enterprise> pageList(@Param("page") Page<Enterprise> page, @Param("tableName") String tableName, @Param("enterprise") Enterprise enterprise);

        Boolean save(Enterprise enterprise);
        /**
         * 根据ID修改企业信息
         */
        Boolean update(Enterprise enterprise);

        /**
         * 根据ID删除企业信息
         */
        Boolean removeById(Long id);

        List<Map<String, Object>> enterpriseInfo(
                @Param("enterprise") Enterprise enterprise,
                @Param("province") String province);

        Enterprise fuzzySearchByNsrsbh(String tableName, String nsrsbh);
}